package com.kk.knife4j.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * the type of springboot-knife4j
 *
 * <p>
 * .
 *
 * @author 王志强
 * @date 2022-11-08
 */
@Api(tags = "测试 knife4j-user-controller")
@ApiSupport(author = "大宝")  //新增接口作者信息，优先级更高
@RestController
public class UserController {

    @GetMapping("/name")
    @ApiImplicitParam(name = "name", value = "用户名")
    @ApiOperation("测试接口")
    @ApiOperationSupport(author = "成都王某")  //新增接口作者信息，优先级更高
    public String name(String name) {
        return "I'm knife4j." + name;
    }
}
